home *** CD-ROM | disk | FTP | other *** search
- Path: inforamp.net!usenet
- From: rmorin@inforamp.net (Randy Charles Morin)
- Newsgroups: comp.lang.c++
- Subject: Re: newbie help with 2-d arrays please ?
- Date: Fri, 19 Apr 1996 03:23:09 GMT
- Organization: InfoRamp Inc., Toronto, Ontario (416) 363-9100
- Message-ID: <4l6mei$ah3@sam.inforamp.net>
- References: <4kvla7$516@pipe9.nyc.pipeline.com>
- NNTP-Posting-Host: ts47-12.tor.istar.ca
- X-Newsreader: Forte Free Agent 1.0.82
-
- gniemcew@nyc.pipeline.com (Gabriel Niemcewicz) wrote:
-
- >I am currently writing a project on graphs and I encountered something I
- >cannot figure out when writing adjacency matrix representation:
- > table = new int [temp_size][temp_size]; // this gives me errors about
- >Any suggestions ? I would appreciate some feedback.
-
- try
-
- int ** table;
- table = new int * [temp_size];
- for (int i=0;i<temp_size;i++)
- table[i] = new int;
-
- or something like that;
-
-
- Agrivar
-
- aka Randy Charles Morin,
- MiddleWorld SoftWare,
- Satisfying Your Bit and Bytes,
- Canada 1-800-363-3780
- Other 1-905-279-2087
- eMail rmorin@inforamp.net
-
-